import request from '@/utils/request'
import type JsonResult from '@/types/JsonResult';
import type UserInfo from "@/types/UserInfo";

/**
 * 用户登录
 * @param param 表单
 * @returns 登录结果
 */
export const doLogin = (param: UserInfo) => request.post<JsonResult>("/api/admin/user/login",param)



/**
 * 用户登出
 * @param id 登出id
 * @returns 登出结果 
 */
export const doLogout = (id:number)=> request.post<JsonResult>("/api/admin/user/logout/"+id)


/**
 * 获取公钥
 * @returns 公钥
 */
export const getPublicKey = () => request.get<JsonResult>("/api/admin/api/public-key")
 